
$(document).ready(function(){
	if( location.href.indexOf("samsung.com") != -1 ){
		if( location.href.indexOf("cm29.jsp") != -1 ){
			$( "h1.logo a" ).attr( "target", "_self" );

			$( ".btn_box_area .btn_ul .link_sytle").removeClass().addClass("link_style");

			$( ".pop_layer .btn_join.btn_left" ).attr( "href", "javascript:cm29_web.showPop('pop_form_insta')" );

			//$( ".sns_area a").attr( "href", "javascript:alert('이벤트가 종료되었습니다.');" );
		}
		if( location.href.indexOf("teaser_old.jsp") != -1 ){
			$( "div#wrap_topNavi_web").height(0);

			$("#content", parent.document).prepend('<div id="top_navi_web"></div><div id="top_navi_mobile"></div><div id="feature_navi_web"></div><div id="feature_navi_mobile"></div>');
		}
		if( location.href.indexOf( "timeless.jsp" ) != -1 ) {
			var imgArr = [], fbImgArr = [];
			for( var i = 0, size = ksMentsTime.length ; i < size ; i++) {
				imgArr	.push( "http://dev.does.kr/comLocal/event/1503_galaxys6/images/event/timeless/snsImage/insta" + ( i+1 ) + ".png" );
				fbImgArr.push( "http://dev.does.kr/comLocal/event/1503_galaxys6/images/event/timeless/snsImage/fb" + (i+1) + ".jpg" );
			}
			snsTime.getImage = function( type ) {
				var idx = snsTime.getEpisodeNum();
				if( type == "tw" )		return imgArr[ idx ];
				else					return fbImgArr[ idx ];
			}

			//var $showCase = $('.showcase_area');
			//var $videoBox = $('.video_box');
			//
			//timeless_web.moveSlide = function( num ) {
			//	var $zoom1 = $('.zoom1').find('img');
			//	var $zoom2 = $('.zoom2').find('img');
			//	var dom = '';
			//
			//	dom += '<video id="video'+num+'" loop src="'+imgServerDomain+'images/event/timeless/web/slide'+num+'.mp4" autoplay="true" width="100%" height="100%" poster="'+imgServerDomain+'images/event/timeless/web/slide'+num+'_img.jpg"></video>';
			//	$videoBox.fadeOut(function(){
			//		$videoBox.html('');
			//
			//		setTimeout(function(){
			//			$videoBox.eq(num - 1).fadeIn();
			//			$videoBox.eq(num - 1).html(dom);
			//		},500);
			//	});
			//
			//	if(num == 1 || num == 4 || num == 7){
			//		TweenMax.to($('.text_area'), 0.5, {width:'23%',delay:0.2,ease:Power3.easeOut});
			//		$showCase.removeClass('half');
			//	}else{
			//		TweenMax.to($('.text_area'), 0.5, {width:'40%',delay:0.4,ease:Power3.easeOut});
			//		$showCase.addClass('half');
			//	}
			//
			//	$zoom1.attr('src',imgServerDomain+'images/event/timeless/web/showcase/slide'+num+'_s_blur.jpg');
			//	$zoom2.attr('src',imgServerDomain+'images/event/timeless/web/showcase/slide'+num+'_b_blur.jpg');
			//
			//	TweenMax.to($('.num').find('img'), 0.5, {marginTop:(num - 1) * -13,delay:0.4,ease:Power3.easeOut});
			//
			//	$('.sns_img').find('img').attr('src',imgServerDomain+'images/event/timeless/web/pop/sns_img'+num+'.jpg');
			//	$('.insta_down').attr("href",localDomain+'include/img_downTime.jsp?file='+timeless_web.checkIdx());
			//}

			//fbTime.share = function () {
			//
			//	if( snsTime.isFBWeb() ) {
			//		alert( "페이스북 앱에서는 페이스북으로 응모할 수 없습니다." )
			//		return;
			//	}
			//	var data = {
			//		name		: snsTime.getTitle(),
			//		link		: "http://www.samsung.com/sec/galaxys6/timelessshowcase/index_sec.html",
			//		redirect	: localDomain + "call_finishTime.jsp?type=fb",
			//		picture		: snsTime.getImage('fb'),
			//		desc		: snsTime.getMent('fb')
			//	};
			//
			//	var	facebookID		= "356493971041432";					// s6 삼성용
			//
			//	if( location.href.indexOf( "does.kr" ) > -1 ) {
			//		facebookID		= "1421832494786694";					// s6 더즈용
			//
			//		data.link = frameDomain + "sds/timeless.html";
			//	}
			//
			//	//data.picture	= "http://dev.does.kr/comLocal/event/1503_galaxys6/images/event/timeless/snsImage/fb1.png";
			//	data.desc		= encodeURI( data.desc );
			//
			//
			//	var newWin = window.open("https://www.facebook.com/dialog/feed?app_id=" + facebookID +
			//		"&redirect_uri=" + data.redirect +
			//		"&display=popup" +
			//		"&link=" + encodeURI( data.link ) +
			//		"&name=" + encodeURI( data.name ) +
			//		"&picture=" + data.picture +
			//		"&description=" + data.desc,
			//		snsTime.getTopOrBlank(),
			//		"width=600,height=300,location=no,resizable=no, scrollbars=no, status=no");
			//}
		}
	}
});


